const fs = require("fs");

// 写入文件
function writeFile(path, pathname, content, mode = {}) {
  fs.mkdir(path, { recursive: true }, (err) => {
    if (err) throw err;
    return fs.promises.writeFile(path + pathname, content, mode);
  });
}

module.exports = writeFile;
